package org.user.service;

import org.user.dao.UserDao;
import org.user.pojo.User;

public class UserServiceImpl implements UserService {

	UserDao userDao;
	
	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}

	public User login(String name,String password) {
		User user = userDao.get(name);
		if(user != null && user.getPassword().equals(password))
			return user;
		else
			return null;
	}

}
